window.onload = function () {
    //  创建雇主中心移入移出效果
    var toparrow = document.getElementById("toparrow");
    var Theorder = document.getElementById("Theorder");
    var bottomarrow = document.getElementById("bottomarrow");
    var toporder = document.getElementById("toporder");
    toparrow.style.display = "none";
    Theorder.onmouseover = function () {
        Theorder.style.background = "#ffff";
        toparrow.style.display = "inline-block"
        bottomarrow.style.display = "none";
        toporder.style.display = "block";
    }
    Theorder.onmouseout = function () {
        Theorder.style.background = "#F0F0F0";
        toparrow.style.display = "none";
        bottomarrow.style.display = "inline-block";
        toporder.style.display = "none";
    }

    //创建威客中心移入移出状态
    var beating = document.getElementById("beating");
    logoFigure.style.display = "none";
    beating.onmouseover = function () {
        logoFigure.style.display = "inline-block";
    }
    beating.onmouseout = function () {
        logoFigure.style.display = "none";
    }

    //创建帮助中心
    var helpcenter = document.getElementById("helpcenter");
    theArrow.style.display = "none";

    helpcenter.onmouseover = function () {
        theArrow.style.display = "inline-block";
        arrow.style.display = "none"
        dropdown.style.display = "inline-block"
        helpcenter.style.backgroundColor = "#Ffff";
    }
    helpcenter.onmouseout = function () {
        arrow.style.display = "inline-block";
        theArrow.style.display = "none";
        dropdown.style.display = "none";
        helpcenter.style.backgroundColor = "#F0F0F0";
    }

    //绑定网站导航事件
    var webSite = document.getElementById("webSite");
    theframework.style.display = "none";
    theunderline.style.display = "none";
    webSite.style.background = "#F0F0F0";
    framework.style.display = "none"
    xiaarrow.style.display = "none"
    webSite.onmouseover = function () {
        webSite.style.background = "#fff";
        framework.style.display = "inline-block";
        theunderline.style.display = "block";
        theframework.style.display = "block";
        rightarrow.style.display = "none";
        xiaarrow.style.display = "inline-block";
    }
    webSite.onmouseout = function () {
        webSite.style.border = "none";
        theframework.style.display = "none";
        theunderline.style.display = "none";
        framework.style.display = "none";
        webSite.style.background = "#F0F0F0";
        rightarrow.style.display = "inline-block";
        xiaarrow.style.display = "none";
    }

    //  设置中间服务点击事件
    var fuwu = document.getElementById("fuwu")
    var renwu = document.getElementById("renwu");
    var weike = document.getElementById("weike");
    fuwu.onclick = function () {
        fuwu.style.background = "#EA5839";
        renwu.style.background = "none";
        weike.style.background = "none";
        fuwu.style.color = "#ffff"
        weike.style.color = "#000000";
        renwu.style.color = "#000000";
    }
    renwu.onclick = function () {
        renwu.style.background = "#EA5839";
        fuwu.style.background = "none";
        weike.style.background = "none";
        fuwu.style.color = "#000000";
        renwu.style.color = "#ffff"
        weike.style.color = "#000000";
    }
    weike.onclick = function () {
        renwu.style.background = "none";
        fuwu.style.background = "none";
        weike.style.background = "#EA5839";
        fuwu.style.color = "#000000";
        renwu.style.color = "#000000";
        weike.style.color = "#ffff"
    }


    operatin.onmouseover = function () {
        operatin.style.backgroundColor = "#fff";
        tui.style.color = "#000";
        kqk.style.display = "inline-block"
    }

    operatin.onmouseout = function () {
        operatin.style.backgroundColor = "#50525D";
        tui.style.color = "#Fff";
        kqk.style.display = "none";
    }

    //    设置品牌设计移入事件
    lipeng.onmouseover = function () {
        lipeng.style.backgroundColor = "#fff";
        op.style.display = "inline-block"
        she.style.color = "#000";
    }

    lipeng.onmouseout = function () {
        lipeng.style.backgroundColor = "#50525D";
        op.style.display = "none"
        she.style.color = "#fff";
    }

    //设置知识产权事件
    jichang.onmouseover = function () {
        jichang.style.backgroundColor = "#fff";
        df.style.color = "#000";
        littlebit.style.display = "inline-block"
    }
    jichang.onmouseout = function () {
        jichang.style.backgroundColor = "#50525D";
        df.style.color = "#fff";
        littlebit.style.display = "none";
    }

    //设置工商服务
    zxc.onmouseover = function () {
        zxc.style.backgroundColor = "#fff";
        xiaoniao.style.color = "#000"
        gongshang.style.display = "inline-block";
    }
    zxc.onmouseout = function () {
        zxc.style.backgroundColor = "#50525D";
        xiaoniao.style.color = "#fff"
        gongshang.style.display = "none";
    }

    //设置财税服务
    cxz.onmouseover = function () {
        cxz.style.backgroundColor = "#fff";
        cais.style.color = "#000"
        caiwuda.style.display = "inline-block";
    }
    cxz.onmouseout = function () {
        cxz.style.backgroundColor = "#50525D";
        cais.style.color = "#fff"
        caiwuda.style.display = "none";
    }

    //设置IT服务
    kaifa.onmouseover = function () {
        kaifa.style.backgroundColor = "#fff";
        kai.style.color = "#000"
        nanjing.style.display = "inline-block";
    }
    kaifa.onmouseout = function () {
        kaifa.style.backgroundColor = "#50525D";
        kai.style.color = "#fff"
        nanjing.style.display = "none";
    }

    //设置法律服务事件
    dakai.onmouseover = function () {
        dakai.style.backgroundColor = "#fff";
        dakai.style.height = 81 + "px"
        baise.style.color = "#000"
        guanzhu.style.display = "inline-block";
    }
    dakai.onmouseout = function () {
        dakai.style.backgroundColor = "#50525D";
        baise.style.color = "#fff"
        guanzhu.style.display = "none";
    }
    // var zxc = document.getElementById("zxc");
    //   zxc.onmouseover = function(){

    //           bb.innerHTML = "我是爸爸";

    //   }

    //设置轮播图事件
    var items = document.getElementsByClassName("item");
    var goPrebtn = document.getElementById("goPre");
    var goNextbtn = document.getElementById("goNext");
    var points = document.getElementsByClassName("point");

    var time = 0; //定时器变量参数
    var index = 0;
    // index表示第几张图片在展示 +++》第index张图片唷active这个类名
    //第几个点在展示

    var clearActive = function () {
        for (var i = 0; i < items.length; i++) {
            items[i].className = "item";
        };
        for (var i = 0; i < points.length; i++) {
            points[i].className = "point";
        }
    }

    var goIndex = function () {
        clearActive();
        items[index].className = 'item active';
        points[index].className = 'point active';
    }

    var goNext = function () {
        if (index < 2) {
            index++;
        } else {
            index = 0;
        };
        goIndex();
    }

    var goPre = function () {
        if (index == 0) {
            index = 2;
        } else {
            index--;
        };
        goIndex();
    }
    goNextbtn.addEventListener("click", function () {
        goNext();
        time = 0;

    });
    goPrebtn.addEventListener("click", function () {
        goPre();
        time = 0;
    });

    for (var i = 0; i < points.length; i++) {
        points[i].addEventListener("click", function () {
            var pointIndex = this.getAttribute("data-index");
            index = pointIndex;
            goIndex();
            time = 0;
        })
    }

    setInterval(function () {
        time++;
        if (time == 30) {
            goNext();
            time = 0;
        }
    }, 100)

    //设置右边导航样式
    var fena = document.getElementById("fena");
    var bnuy = document.getElementById("bnuy");
    liao.style.display = "none";
    // khg.style.border = "none";
    bnuy.onclick = function () {
        fena.style.display = "none";
        liao.style.display = "inline-block";
        khg.style.color = "#FF6243";
        khg.style.fontWeight = "bold";
        wuqu.style.display = "inline-block";
        ruzhuu.style.display = "inline-block";
        dieig.style.display = "none"
        zaigan.style.display = "none";
        wuqi.style.color = "#000";
        wuqi.style.fontWeight = "normal";
    }
    zhaoren.onclick = function () {
        khg.style.border = "none"
        fena.style.display = "inline-block";
        liao.style.display = "none";
        khg.style.fontWeight = "normal";
        khg.style.color = "#000"
        wuqu.style.display = "none";
        ruzhuu.style.display = "none";
        dieig.style.display = "inline-block";
        zaigan.style.display = "inline-block";
        wuqi.style.fontWeight = "bold";
        wuqi.style.color = "#FF6243";
    }

    //    设置右侧事件
    gongzhe.onmouseover = function () {
        guizee.style.border = "none";
        zixxun.style.color = "#333333";
        guizee.style.color = "#333333";
        gongzhe.style.fontWeight = "bold";
        gongzhe.style.border = "";
        gongzhe.style.color = "#FF6243";
        zixxun.style.fontWeight = "normal";
        zixxun.style.border = "none";
        zij.style.display = "inline-block";
        cij.style.display = "none";
        guizee.style.fontWeight = "normal";
        xudf.style.display = "none";
    }
    zixxun.onmouseover = function () {
        guizee.style.border = "none";
        gongzhe.style.border = "none";
        zixxun.style.fontWeight = "bold";
        zixxun.style.color = "#FF6243";
        zixxun.style.border = "";
        guizee.style.color = "#333333";
        gongzhe.style.color = "#333333";
        gongzhe.style.fontWeight = "normal";
        zixxun.style.color = "#33333";
        guizee.style.fontWeight = "normal";
        cij.style.display = "inline-block";
        zij.style.display = "none"
        xudf.style.display = "none";
    }

    guizee.onmouseover = function () {
        zixxun.style.color = "#333333";
        gongzhe.style.border = "none";
        gongzhe.style.color = "#333333";
        gongzhe.style.fontWeight = "normal";
        zixxun.style.border = "none";
        guizee.style.color = "#FF6243";
        guizee.style.border = "";
        guizee.style.fontWeight = "bold";
        zixxun.style.border = "none";
        zixxun.style.color = "#33333";
        zixxun.style.fontWeight = "normal";
        xudf.style.display = "inline-block";
        cij.style.display = "none";
        zij.style.display = "none";
    }

    //设置无缝滚动字体
    var content = document.getElementById("content");
    var listBox = content.getElementsByTagName("ul")[0];
    var dong = listBox.getElementsByTagName("li")
    var speed = 1;

    listBox.innerHTML += listBox.innerHTML
    listBox.style.height = 11 * dong[0].offsetHeight + "px"

    function run() {
        if (listBox.offsetTop < -listBox.offsetHeight / 2) {
            listBox.style.top = 0;
        } else if (listBox.offsetTop > 0) {
            listBox.style.top = -listBox.offsetHeight / 2 + "px";
        }
        listBox.style.top = listBox.offsetTop + speed + "px";
    };
    timer = setInterval(run, 90);
    content.onmouseover = function () {
        clearInterval(timer);
    }

    content.onmouseout = function () {
        timer = setInterval(run, 90);
    }

    // 设置优质服务商
    yinn.style.color = "#EA5839";
    yingx.style.borderBottom = "2px solid #EA5839"
    yinn.style.fontWeight = "bold";
    shengsd.style.display = "block";
    yingx.onmouseover = function () {
        yinn.style.color = "#EA5839";
        yinn.style.fontWeight = "bold";
        yingx.style.borderBottom = "2px solid #EA5839";
        shejo.style.borderBottom = "none";
        sho.style.color = "#666666";
        sho.style.fontWeight = "normal";
        libing.style.borderBottom = "none";
        lias.style.fontWeight = "normal";
        lias.style.color = "#666666";
        liped.style.borderBottom = "none";
        linia.style.fontWeight = "normal";
        linia.style.color = "#666666";
        jichaz.style.borderBottom = "none";
        shxg.style.color = "#666666";
        shxg.style.fontWeight = "normal";
        congfh.style.borderBottom = "none";
        eryu.style.color = "#666666";
        eryu.style.fontWeight = "normal";
        huiyt.style.borderBottom = "none";
        tinmji.style.color = "#666666";
        tinmji.style.fontWeight = "normal";
        dirt.style.display = "none";
        shengsd.style.display = "block";
        sanxc.style.display = "none";
        jiganbv.style.display = "none";
        xiaohe.style.display = "none";
        guoyaoz.style.display = "none"
        huzida.style.display = "none";
    }
    shejo.onmouseover = function () {
        yingx.style.borderBottom = "none";
        shejo.style.borderBottom = "2px solid #EA5839";
        yinn.style.color = "#666666";
        yinn.style.fontWeight = "normal";
        sho.style.fontWeight = "bold";
        sho.style.color = "#EA5839";
        libing.style.borderBottom = "none";
        lias.style.fontWeight = "normal";
        lias.style.color = "#666666";
        liped.style.borderBottom = "none";
        linia.style.fontWeight = "normal";
        linia.style.color = "#666666";
        jichaz.style.borderBottom = "none";
        shxg.style.color = "#666666";
        shxg.style.fontWeight = "normal";
        congfh.style.borderBottom = "none";
        eryu.style.color = "#666666";
        eryu.style.fontWeight = "normal";
        huiyt.style.borderBottom = "none";
        tinmji.style.color = "#666666";
        tinmji.style.fontWeight = "normal";
        dirt.style.display = "block";
        shengsd.style.display = "none";
        sanxc.style.display = "none";
        jiganbv.style.display = "none";
        xiaohe.style.display = "none";
        guoyaoz.style.display = "none"
        huzida.style.display = "none";
    }
    libing.onmouseover = function () {
        sho.style.color = "#666666";
        sho.style.fontWeight = "normal";
        shejo.style.borderBottom = "none";
        lias.style.color = "#EA5839";
        lias.style.fontWeight = "bold";
        libing.style.borderBottom = "2px solid #EA5839";
        liped.style.borderBottom = "none";
        linia.style.fontWeight = "normal";
        linia.style.color = "#666666";
        jichaz.style.borderBottom = "none";
        shxg.style.color = "#666666";
        shxg.style.fontWeight = "normal";
        congfh.style.borderBottom = "none";
        eryu.style.color = "#666666";
        eryu.style.fontWeight = "normal";
        huiyt.style.borderBottom = "none";
        tinmji.style.color = "#666666";
        tinmji.style.fontWeight = "normal";
        sanxc.style.display = "block";
        jiganbv.style.display = "none";
        xiaohe.style.display = "none";
        shengsd.style.display = "none";
        dirt.style.display = "none";
        guoyaoz.style.display = "none"
        huzida.style.display = "none";
    }
    liped.onmouseover = function () {
        liped.style.borderBottom = "2px solid #EA5839";
        linia.style.color = "#EA5839";
        linia.style.fontWeight = "bold"
        libing.style.borderBottom = "none";
        lias.style.fontWeight = "normal";
        lias.style.color = "#666666";
        yingx.style.borderBottom = "none";
        yinn.style.color = "#666666";
        yinn.style.fontWeight = "normal";
        shejo.style.borderBottom = "none";
        sho.style.color = "#666666";
        sho.style.fontWeight = "normal";
        jichaz.style.borderBottom = "none";
        shxg.style.color = "#666666";
        shxg.style.fontWeight = "normal";
        congfh.style.borderBottom = "none";
        eryu.style.color = "#666666";
        eryu.style.fontWeight = "normal";
        huiyt.style.borderBottom = "none";
        tinmji.style.color = "#666666";
        tinmji.style.fontWeight = "normal";
        jiganbv.style.display = "block";
        xiaohe.style.display = "none";
        shengsd.style.display = "none";
        dirt.style.display = "none";
        sanxc.style.display = "none";
        guoyaoz.style.display = "none"
        huzida.style.display = "none";
    }
    jichaz.onmouseover = function () {
        jichaz.style.borderBottom = "2px solid #EA5839";
        shxg.style.color = "#EA5839";
        shxg.style.fontWeight = "bold";
        libing.style.borderBottom = "none";
        lias.style.fontWeight = "normal";
        lias.style.color = "#666666";
        yingx.style.borderBottom = "none";
        yinn.style.color = "#666666";
        yinn.style.fontWeight = "normal";
        shejo.style.borderBottom = "none";
        sho.style.color = "#666666";
        sho.style.fontWeight = "normal";
        liped.style.borderBottom = "none";
        linia.style.fontWeight = "normal";
        linia.style.color = "#666666";
        congfh.style.borderBottom = "none";
        eryu.style.color = "#666666";
        eryu.style.fontWeight = "normal";
        huiyt.style.borderBottom = "none";
        tinmji.style.color = "#666666";
        tinmji.style.fontWeight = "normal";
        xiaohe.style.display = "block";
        shengsd.style.display = "none";
        dirt.style.display = "none";
        sanxc.style.display = "none";
        jiganbv.style.display = "none";
        guoyaoz.style.display = "none"
        huzida.style.display = "none";
    }

    congfh.onmouseover = function () {
        huiyt.style.borderBottom = "none";
        tinmji.style.color = "#666666";
        tinmji.style.fontWeight = "normal";
        congfh.style.borderBottom = "2px solid #EA5839";
        eryu.style.color = "#EA5839";
        eryu.style.fontWeight = "bold";
        jichaz.style.borderBottom = "none";
        shxg.style.color = "#666666";
        shxg.style.fontWeight = "normal";
        libing.style.borderBottom = "none";
        lias.style.fontWeight = "normal";
        lias.style.color = "#666666";
        yingx.style.borderBottom = "none";
        yinn.style.color = "#666666";
        yinn.style.fontWeight = "normal";
        shejo.style.borderBottom = "none";
        sho.style.color = "#666666";
        sho.style.fontWeight = "normal";
        liped.style.borderBottom = "none";
        linia.style.fontWeight = "normal";
        linia.style.color = "#666666";
        guoyaoz.style.display = "block";
        xiaohe.style.display = "none";
        shengsd.style.display = "none";
        dirt.style.display = "none";
        sanxc.style.display = "none";
        jiganbv.style.display = "none";
        huzida.style.display = "none";
    }
    huiyt.onmouseover = function () {
        huiyt.style.borderBottom = "2px solid #EA5839";
        tinmji.style.color = "#EA5839";
        tinmji.style.fontWeight = "bold";
        congfh.style.borderBottom = "none";
        eryu.style.color = "#666666";
        eryu.style.fontWeight = "normal";
        jichaz.style.borderBottom = "none";
        shxg.style.color = "#666666";
        shxg.style.fontWeight = "normal";
        libing.style.borderBottom = "none";
        lias.style.fontWeight = "normal";
        lias.style.color = "#666666";
        yingx.style.borderBottom = "none";
        yinn.style.color = "#666666";
        yinn.style.fontWeight = "normal";
        shejo.style.borderBottom = "none";
        sho.style.color = "#666666";
        sho.style.fontWeight = "normal";
        liped.style.borderBottom = "none";
        linia.style.fontWeight = "normal";
        linia.style.color = "#666666";
        huzida.style.display = "block";
        guoyaoz.style.display = "none";
        xiaohe.style.display = "none";
        shengsd.style.display = "none";
        dirt.style.display = "none";
        sanxc.style.display = "none";
        jiganbv.style.display = "none";

    }

    //  设置广告投放
    anuhj.style.borderBottom = "2px solid #EA5839";
    jinghdf.style.display = "block";
    anuhj.onmouseover = function () {
        anuhj.style.borderBottom = "2px solid #EA5839";
        pinghy.style.borderBottom = "none";
        chanbig.style.borderBottom = "none";
        gongawu.style.borderBottom = "none";
        bihaozt.style.borderBottom = "none";
        diannaou.style.borderBottom = "none";
        jinghdf.style.display = "block";
        huapenfg.style.display = "none";
        duoniaty.style.display = "none";
        jizhangs.style.display = "none";
        tewdsfg.style.display = "none";
        yaoshenzo.style.display = "none";
    }
    pinghy.onmouseover = function () {
        anuhj.style.borderBottom = "none";
        pinghy.style.borderBottom = "2px solid #EA5839";
        chanbig.style.borderBottom = "none";
        gongawu.style.borderBottom = "none";
        bihaozt.style.borderBottom = "none";
        diannaou.style.borderBottom = "none";
        jinghdf.style.display = "none";
        huapenfg.style.display = "block";
        duoniaty.style.display = "none";
        jizhangs.style.display = "none";
        tewdsfg.style.display = "none";
        yaoshenzo.style.display = "none";
    }
    chanbig.onmouseover = function () {
        anuhj.style.borderBottom = "none";
        pinghy.style.borderBottom = "none";
        chanbig.style.borderBottom = "2px solid #EA5839";
        gongawu.style.borderBottom = "none";
        bihaozt.style.borderBottom = "none";
        diannaou.style.borderBottom = "none";
        jinghdf.style.display = "none";
        huapenfg.style.display = "none";
        duoniaty.style.display = "block";
        jizhangs.style.display = "none";
        tewdsfg.style.display = "none";
        yaoshenzo.style.display = "none";
    }
    gongawu.onmouseover = function () {
        anuhj.style.borderBottom = "none";
        pinghy.style.borderBottom = "none";
        chanbig.style.borderBottom = "none";
        bihaozt.style.borderBottom = "none";
        diannaou.style.borderBottom = "none";
        gongawu.style.borderBottom = "2px solid #EA5839";
        jinghdf.style.display = "none";
        huapenfg.style.display = "none";
        duoniaty.style.display = "none";
        jizhangs.style.display = "block";
        tewdsfg.style.display = "none";
        yaoshenzo.style.display = "none";
    }
    bihaozt.onmouseover = function () {
        anuhj.style.borderBottom = "none";
        pinghy.style.borderBottom = "none";
        chanbig.style.borderBottom = "none";
        gongawu.style.borderBottom = "none";
        bihaozt.style.borderBottom = "2px solid #EA5839";
        diannaou.style.borderBottom = "none";
        jinghdf.style.display = "none";
        huapenfg.style.display = "none";
        duoniaty.style.display = "none";
        jizhangs.style.display = "none";
        tewdsfg.style.display = "block";
        yaoshenzo.style.display = "none";
    }
    diannaou.onmouseover = function () {
        anuhj.style.borderBottom = "none";
        pinghy.style.borderBottom = "none";
        chanbig.style.borderBottom = "none";
        gongawu.style.borderBottom = "none";
        bihaozt.style.borderBottom = "none";
        diannaou.style.borderBottom = "2px solid #EA5839";
        jinghdf.style.display = "none";
        huapenfg.style.display = "none";
        duoniaty.style.display = "none";
        jizhangs.style.display = "none";
        tewdsfg.style.display = "none";
        yaoshenzo.style.display = "block";
    }

    temper.onmouseover = function () {
        bands.style.display = "block";
    }
    temper.onmouseout = function () {
        bands.style.display = "none";
    }
    //设置聊天客服样式
    liJsd.onclick = function () {
        accoRding.style.display = "block";
        wuYut.style.display = "none";
    }
    biGio.onclick = function () {
        wuYut.style.display = "block";
        accoRding.style.display = "none";
    }

    //   设置底层广告弹出
    wUtyr.style.display = "block";
    penGdvc.onclick = function () {
        faaRea.style.display = "block";
        wUtyr.style.display = "none";
    }
    faaRea.onclick = function () {
        wUtyr.style.display = "block";
        faaRea.style.display = "none";
    }

    // 设置日期格式
    // 例子： 
    // (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423 
    // (new Date()).Format("yyyy-M-d h:m:s.S")      ==> 2006-7-2 8:9:4.18 
    Date.prototype.Format = function (fmt) {
        var o = {
            "M+": this.getMonth() + 1, //月份 
            "d+": this.getDate(), //日 
            "H+": this.getHours(), //小时 
            "m+": this.getMinutes(), //分 
            "s+": this.getSeconds(), //秒 
            "q+": Math.floor((this.getMonth() + 3) / 3), //季度 
            "S": this.getMilliseconds() //毫秒 
        };
        if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
        for (var k in o)
            if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
        return fmt;
    }


    var time1 = new Date().Format("HH:mm:ss");
    var time2 = new Date().Format("yyyy-MM-dd HH:mm:ss");

    document.getElementById("demo").innerHTML = time2;
    document.getElementById("eonde").innerHTML = time1;


    // 设置滚轮滑动样式
    function aa() {
        //   window.location.hash = "#title";  
        var top = document.getElementById("qiewyDU").offsetTop;
        ScrollTop(top, 1000);

    }
    function dd() {
        var yaoPin = document.getElementById("yaoPin").offsetTop;
        ScrollTop(yaoPin, 1000);
    }
    function cc() {
        var yasnYai = document.getElementById("yasnYai").offsetTop;
        ScrollTop(yasnYai, 1000);
    }
    function bb() {
        var maBaw = document.getElementById("maBaw").offsetTop;
        ScrollTop(maBaw, 1000);
    }
    function ee() {
        var jiaKwty = document.getElementById("jiaKwty").offsetTop;
        ScrollTop(jiaKwty, 1000);
    }
    function ff() {
        var wenDuer = document.getElementById("wenDuer").offsetTop;
        ScrollTop(wenDuer, 1000);
    }
    function gg() {
        var xieRyt = document.getElementById("xieRyt").offsetTop;
        ScrollTop(xieRyt, 1000);
    }
    function hh() {
        var erJyu = document.getElementById("erJyu").offsetTop;
        ScrollTop(erJyu, 1000);
    }
    const ScrollTop = (number = 0, time) => {
        if (!time) {
            document.body.scrollTop = document.documentElement.scrollTop = number;
            return number;
        }
        const spacingTime = 20; // 设置循环的间隔时间  值越小消耗性能越高
        let spacingInex = time / spacingTime; // 计算循环的次数
        let nowTop = document.body.scrollTop + document.documentElement.scrollTop; // 获取当前滚动条位置
        let everTop = (number - nowTop) / spacingInex; // 计算每次滑动的距离
        let scrollTimer = setInterval(() => {
            if (spacingInex > 0) {
                spacingInex--;
                ScrollTop(nowTop += everTop);
            } else {
                clearInterval(scrollTimer); // 清除计时器
            }
        }, spacingTime);
    };

    /// 设置滚轮滑动样式
    qiYei.onclick = function () {
        aa();
    }
    renWzx.onclick = function () {
       dd();
    }
    yanXan.onclick = function(){
        cc();
    }
    youZhi.onclick = function(){
        bb();
    }
    changYong.onclick = function(){
        ee();
    }
    anLi.onclick = function(){
        ff();
    }
    jaioTu.onclick = function(){
        gg();
    }
    pingTao.onclick = function(){
        hh();
    }
    // 设置滚轮隐藏和消失样式
    var windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
    window.onscroll = () => {
        // 页面高度
        var documentHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
        // 滚动条位置
        var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;

        if (scrollTop >= 650) {
            yeMian.style.display = "block";
        } if (650 >= scrollTop) {
            yeMian.style.display = "none";
        }
        if (scrollTop >= 980) {
            qiYei.style.backgroundColor = "#FF6240";
            yanXan.style.backgroundColor = "#fff";
            jiAqw.style.color = "#666666";
            fudYa.style.color = "#fff";
            shuiPw.style.borderBottom = "none";
            taoDa.style.borderBottom = "1px solid #F2F2F2";
        }
        if (980 >= scrollTop) {
            qiYei.style.backgroundColor = "#fff";
            shuiPw.style.borderBottom = "";
            fudYa.style.color = "#666666";
            yanXan.style.backgroundColor = "#FF6240";
            jiAqw.style.color = "#fff";
            taoDa.style.borderBottom = "none";
        }
        if (scrollTop >= 2640) {
            renWzx.style.backgroundColor = "#FF6240";
            fgHvb.style.borderBottom = "none";
            jkGdf.style.color = "#fff";
            qiYei.style.backgroundColor = "#fff";
            shuiPw.style.borderBottom = "";
            fudYa.style.color = "#666666";
        }
        if (2640 >= scrollTop) {
            renWzx.style.backgroundColor = "#fff";
            fgHvb.style.borderBottom = "";
            jkGdf.style.color = "#666666";
        }
        if (scrollTop >= 3425) {
            youZhi.style.backgroundColor = "#FF6240";
            shangTr.style.borderBottom = "none";
            niuBia.style.color = "#fff";
            renWzx.style.backgroundColor = "#fff";
            fgHvb.style.borderBottom = "";
            jkGdf.style.color = "#666666";
        }
        if (3425 >= scrollTop) {
            youZhi.style.backgroundColor = "#fff";
            shangTr.style.borderBottom = "";
            niuBia.style.color = "#666666";
        }
        if (scrollTop >= 4016) {
            changYong.style.backgroundColor = "#FF6240";
            congNa.style.borderBottom = 'none';
            gongJu.style.color = "#fff";
            youZhi.style.backgroundColor = "#fff";
            shangTr.style.borderBottom = "";
            niuBia.style.color = "#666666";
        }
        if (4016 >= scrollTop) {
            changYong.style.backgroundColor = "#fff";
            congNa.style.borderBottom = '';
            gongJu.style.color = "#666666";
        }

        if (scrollTop >= 4252) {
            anLi.style.backgroundColor = "#FF6240";
            shuiYel.style.borderBottom = 'none';
            gongRe.style.color = "#fff";
            changYong.style.backgroundColor = "#fff";
            congNa.style.borderBottom = '';
            gongJu.style.color = "#666666";
        }
        if (4252 >= scrollTop) {
            anLi.style.backgroundColor = "#fff";
            shuiYel.style.borderBottom = '';
            gongRe.style.color = "#666666";
        }
        if (scrollTop >= 4356) {
            jaioTu.style.backgroundColor = "#FF6240";
            bumKo.style.borderBottom = 'none';
            louCci.style.color = "#fff";
            anLi.style.backgroundColor = "#fff";
            shuiYel.style.borderBottom = '';
            gongRe.style.color = "#666666";
        }
        if (4356 >= scrollTop) {
            jaioTu.style.backgroundColor = "#fff";
            bumKo.style.borderBottom = '';
            louCci.style.color = "#666666";
        }
        if (scrollTop >= 4616) {
            pingTao.style.backgroundColor = "#FF6240";
            shuJre.style.color = "#fff";
            jaioTu.style.backgroundColor = "#fff";
            bumKo.style.borderBottom = '';
            louCci.style.color = "#666666";
            pingTao.style.borderRadius = "0";
            fghLu.style.borderBottom = "none";
        }
        if (4616 >= scrollTop) {
            pingTao.style.backgroundColor = "#fff";
            shuJre.style.color = "#666666";
            fghLu.style.borderBottom = "";
            pingTao.style.borderRadius = 8 + "px";
        }
        if ((windowHeight + scrollTop + 2) >= (documentHeight - 100)) {
            yeMian.style.display = "none";

        }
    }
}




